package com.fenqing.leetcode.code.t0_200.t100_200;

import com.fenqing.annotations.Execute;
import com.fenqing.core.Topic;

/**
 * @author fenqing
 */
public class Topic136_1 extends Topic {
    /**
     * 构造器
     *
     * @param input 输入
     */
    public Topic136_1(String input) {
        super(input);
    }

    @Execute
    public int singleNumber(int[] nums) {
        int result = 0;
        for (int num : nums) {
            result ^= num;
        }
        return result;
    }

    public static void main(String[] args) {
        Topic136_1 topic136 = new Topic136_1("""
                [2,2,1]
                """);
        int run = topic136.run();
        System.out.println(run);
    }
}
